<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>登入注册界面</title>
    <link rel="stylesheet" th:href="@{css/logincss/login.css}">
    <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.5.1.min.js"></script>
    <script th:src="@{js/loginjs/login.js}"></script>
    <script th:src="@{js/mainjs/main.js}"></script>
</head>
<body>
<div class="container">
    <div class="form-box">

        <!-- 注册 --> <!--注册界面默认隐藏一开始只显示登入界面-->
        <div class="register-box hidden">
            <h1>注册账号</h1>
            <input type="text" placeholder="用户名" name="username" id="reg_user" required>
            <input type="password" placeholder="密码" name="password" id="reg_pwd" required>
            <input type="password" placeholder="确认密码" name="repassword" required>
            <input type="email" placeholder="邮箱" name="email" required>
            <input type="text" placeholder="手机号码" name="tel" pattern="\d{11}" required>
            <button type="submit" onclick="">注册</button>
        </div>


        <!-- 登录 -->
        <div class="login-box">
            <h1>登入账号</h1>
            <input type="text" placeholder="用户名" name="username" id="log_user" required>
            <input type="password" placeholder="密码" name="password" id="log_pwd" required>
            <p th:text="${msg}" class="message"></p>
            <button type="submit" onclick="user_login()">登入</button>
        </div>
    </div>

    <!--欢迎来到宠物之家界面,没有账号?去登入界面-->
    <div class="con-box left">
        <h2>欢迎来到<span>南宁学院</span></h2>
        <img th:src="@{resource/img/南宁学院图书馆.jpg}" alt="">
        <p>已有账号?点击去登入</p>
        <button id="login">去登录</button>
    </div>

    <!--欢迎来到宠物之家界面,已有账号?去登入界面-->
    <div class="con-box right">
        <h2>欢迎来到<span>南宁学院</span></h2>
        <img th:src="@{resource/img/南宁学院不孤湖.jpg}" alt="">
        <p>没有账号？点击去注册</p>
        <button id="register">去注册</button>
    </div>
</div>
</body>
</html>